package test6;

abstract class Employee
{
    abstract public int getSalary();
}
class Manager extends Employee
{
    private int moonsalary;

    @Override
    public int getSalary() {
        return moonsalary;
    }

    public Manager(int moonsalary) {
        this.moonsalary = moonsalary;
    }
}
class Salesman extends Employee
{
    private int salary;
    private int extra;

    public Salesman(int salary, int extra) {
        this.salary = salary;
        this.extra = extra;
    }

    @Override
    public int getSalary() {
        return salary+extra;
    }
}
class Worker extends Employee
{
    private int day;
    private int daysalary;

    public Worker(int day, int daysalary) {
        this.day = day;
        this.daysalary = daysalary;
    }

    @Override
    public int getSalary() {
        return day*daysalary;
    }
}